{extend name="default/shops/base" /}
{block name="title"}评价列表-卖家中心{__block__}{/block}
{block name="content"}

<div class="wst-shop-head"><span>评价列表</span></div>
<div class="wst-shop-tbar">
  <label>
    商品分类：
    <select name="cat1" id="cat1" onchange="getCat(this.value)" class="s-query">
        <option value="">-请选择-</option>
      {volist name=":WSTShopCats(0)" id="vo"}
            <option value="{$vo['catId']}" >{$vo['catName']}</option>
      {/volist}
    </select>
    <select name="cat2" id="cat2" class="s-query"><option value="">-请选择-</option></select>
  </label>
  <label>
    商品名称：<input type="text" name="goodsName" id="goodsName" class="s-query" /><button class="s-btn" onclick="queryByPage()">查询</button>
  </label>
</div>
<div class="wst-shop-content"> 
   <table class='wst-list'>
   <thead>
   <tr>
     <th width="100">序号</th>
     <th width="400">商品</th>
     <th>商品评分</th>
     <th>服务评分</th>
     <th>时效评分</th>
   </tr>
   </thead>
   <tbody id='list'></tbody>
   <tfoot>
     <tr><td colspan='10' id='pager'></td></tr>
   </tfoot>
   
   <script id="tblist" type="text/html">
   {{# for(var i = 0; i < d.length; i++){ }}
   <tr>
      <td rowspan="2">{{i+1}}</td>
      <td rowspan="2">
          <div class="appra-img">
          <a href="{{WST.U("home/goods/detail","id="+d[i]['goodsId'])}}">
            <img class='gImg'  data-original='__ROOT__/{{d[i].goodsImg}}'/>
          </a>
        </div>
          <p class="appra-goodsName">
            {{WST.cutStr(d[i]['goodsName'],43)}}
          </p>
      </td>


      <td>
      {{# for(var gs=0;gs<d[i]['goodsScore'];++gs){ }}
          <img src="__STATIC__/plugins/raty/img/star-on.png">
      {{# } }}
      </td>

      <td>
      {{# for(var gs=0;gs<d[i]['serviceScore'];++gs){ }}
          <img src="__STATIC__/plugins/raty/img/star-on.png">
      {{# } }}
      </td>
      
      <td>
      {{# for(var gs=0;gs<d[i]['timeScore'];++gs){ }}
          <img src="__STATIC__/plugins/raty/img/star-on.png">
      {{# } }}
      </td>     
   </tr>
   <tr style="border-bottom:1px solid #ccc;">
         <td colspan='3'>评价[{{d[i]['loginName']}}]：{{d[i]['content']}}
             
            {{#  if(d[i]['images']!=''){ var img = d[i]['images'].split(','); var length = img.length;  }}
            <div id="img-file-{{i}}">
            {{#  for(var g=0;g<length;g++){  }}
                   <img src="__ROOT__/{{img[g].replace('.','_thumb.')}}" layer-src="__ROOT__/{{img[g]}}" width="30" height="30" />
            {{#  } }}
            </div>
            {{# }  }}
            <div class="reply-box">
              {{# if(d[i]['shopReply']==null || d[i]['shopReply']=='') { }}
              <textarea cols="65" rows="5" id="reply-{{d[i]['gaId']}}" ></textarea>
              <button class="reply-btn s-btn" onclick="reply(this,{{d[i]['gaId']}})">回复</button>
              {{# }else{ }}
               <p class="reply-content">{{d[i]['shopReply']}}【{{d[i]['replyTime']}}】</p>
              {{# } }}

            </div>
         </td>
      </tr>

   {{# } }}
   </script>
  </table>
</div>
{/block}  
{block name="js"}
<script type='text/javascript' src='__STYLE__/shops/goodsappraises/goodsappraises.js?v={$v}'></script>
<script>
$(function(){
  queryByPage();
})
</script>
{/block}